<!DOCTYPE html>
<html>
<head>
<title>院内护士站提醒</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta
	content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
	name="viewport">
<link rel="stylesheet" href="../../css/bootstrap.min.css">
<link rel="stylesheet" href="../../css/font-awesome.min.css">
<link rel="stylesheet"
	href="../../plugins/jqgrid/ui.jqgrid-bootstrap.css">
<link rel="stylesheet"
	href="../../plugins/ztree/css/metroStyle/metroStyle.css">
<link rel="stylesheet" href="../../css/main.css">
<script src="../../libs/jquery.min.js"></script>
<script src="../../plugins/layer/layer.js"></script>
<script src="../../libs/bootstrap.min.js"></script>
<script src="../../libs/vue.min.js"></script>
<script src="../../plugins/jqgrid/grid.locale-cn.js"></script>
<script src="../../plugins/jqgrid/jquery.jqGrid.min.js"></script>
<script src="../../plugins/ztree/jquery.ztree.all.min.js"></script>
<script src="../../js/common.js"></script>
<link href="../../plugins/jquery-select2/3.4/select2.min.css"
	rel="stylesheet" />
<script src="../../plugins/jquery-select2/3.4/select2.min.js"
	type="text/javascript"></script>
	<script>
$(document).ready(function(){
var top ="0 ";
var last="* ?";
var minutes="* ";
var hour="* ";
var day="* ";

$("#minutes").change(function(){
    minutes = $("#minutes").val()+" ";  
	document.getElementById("cron").value =(top+minutes+hour+day+last);
})

$("#hour").change(function(){
   hour=$("#hour").val()+" ";  
	document.getElementById("cron").value =(top+minutes+hour+day+last);
})

$("#day").change(function(){
   day = $("#day").val()+" ";  
   document.getElementById("cron").value =(top+minutes+hour+day+last);
}) 

})


       
    
</script>
</head>
<body>
	<div id="rrapp" v-cloak>
		<div v-show="showList">
			<div class="grid-btn" style="height: 34px;">
				<div class="form-group col-sm-2">
					<input type="text" class="form-control" v-model="q.bedNO"
						@keyup.enter="query" placeholder="护士站">
				</div>
				<a class="btn btn-default" @click="query">查询</a> <a
					v-if="hasPermission('sys:stationNotes:save')" class="btn btn-primary"
					@click="add"><i class="fa fa-plus"></i>&nbsp;新增</a> <a
					v-if="hasPermission('sys:stationNotes:update')" class="btn btn-primary"
					@click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a> <a
					v-if="hasPermission('sys:stationNotes:delete')" class="btn btn-primary"
					@click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a> <a
					v-if="hasPermission('sys:stationNotes:pause')" class="btn btn-primary"
					@click="pause"><i class="fa fa-pause"></i>&nbsp;暂停</a> <a
					v-if="hasPermission('sys:stationNotes:resume')" class="btn btn-primary"
					@click="resume"><i class="fa fa-play"></i>&nbsp;恢复</a> <a
					v-if="hasPermission('sys:stationNotes:run')" class="btn btn-primary"
					@click="runOnce"><i class="fa fa-arrow-circle-right"></i>&nbsp;立即执行</a>
				<a v-if="hasPermission('sys:stationNotes:log')" class="btn btn-danger"
					style="float: right;" href="schedule_log.html">日志列表</a>
			</div>
			<table id="jqGrid"></table>
			<div id="jqGridPager"></div>
		</div>

		<div v-show="!showList" class="panel panel-default">
			<div class="panel-heading">{{title}}</div>
			<form class="form-horizontal">
				<div class="form-group">
					<div class="col-sm-2 control-label">所属组织</div>
					<div class="col-sm-10">
						<input type="text" class="form-control" style="cursor: pointer;" 
							v-model="schedule.deptName" @click="deptTree" readonly="readonly" name="deptName"
							placeholder="所属组织" />
					</div>
				</div>
				<div class="form-group">
					<div class="col-sm-2 control-label">所属病区</div>
					<div class="col-sm-10">
						<input type="text" class="form-control" style="cursor: pointer;"
							v-model="schedule.sickAreaName" @click="deptTreeSick" name="sickAreaName" 
							readonly="readonly" placeholder="所属病区" />
					</div>
				</div>
				<div class="form-group">
					<div class="col-sm-2 control-label">选择护士站</div>
					<div class="col-sm-10">
						<select v-model="schedule.bedNO" style="width:100%;"
							placeholder="请选择" id="bedNO">
							<option value="-1">请选择</option>
							<option v-for="option in bedNOList" v-bind:value="option.value">
									{{ option.text }}</option>
						</select>
					</div>
				</div>
				<div class="form-group">
					<div class="col-sm-2 control-label">选择提醒类型</div>
					<div class="col-sm-10">
						<select v-model="schedule.remindType" placeholder="请选择"
							class="form-control">
							<option v-for="option in remindTypeList"
								v-bind:value="option.value">
									{{ option.text }}</option>
						</select>
					</div>
				</div>
				
				<div class="form-group">
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			分:
			<select id="minutes">
			  <option value="*"> *</option>			
			  <option value="0">00</option>
			  <option value="1">01</option>
			  <option value="2">02</option>
			  <option value="3">03</option>
			  <option value="4">04</option>
			  <option value="5">05</option>
			  <option value="6">06</option>
			  <option value="7">07</option>
			  <option value="8">08</option>
			  <option value="9">09</option>
			  <option value="10">10</option>
			  <option value="11">11</option>
			  <option value="12">12</option>
			  <option value="13">13</option>
			  <option value="14">14</option>
			  <option value="15">15</option>
			  <option value="16">16</option>
			  <option value="17">17</option>
			  <option value="18">18</option>
			  <option value="19">19</option>
			  <option value="20">20</option>
			  <option value="21">21</option>
			  <option value="22">22</option>
			  <option value="23">23</option>
			  <option value="24">24</option>
			  <option value="25">25</option>
			  <option value="26">26</option>
			  <option value="27">27</option>
			  <option value="28">28</option>
			  <option value="29">29</option>
			  <option value="30">30</option>
			  <option value="31">31</option>
			  <option value="32">32</option>
			  <option value="33">33</option>
			  <option value="34">34</option>
			  <option value="35">35</option>
			  <option value="36">36</option>
			  <option value="37">37</option>
			  <option value="38">38</option>
			  <option value="39">39</option>
			  <option value="40">40</option>
			  <option value="41">41</option>
			  <option value="42">42</option>
			  <option value="43">43</option>
			  <option value="44">44</option>
			  <option value="45">45</option>
			  <option value="46">46</option>
			  <option value="47">47</option>
			  <option value="48">48</option>
			  <option value="49">49</option>
			  <option value="50">50</option>
			  <option value="51">51</option>
			  <option value="52">52</option>
			  <option value="53">53</option>
			  <option value="54">54</option>
			  <option value="55">55</option>
			  <option value="56">56</option>
			  <option value="57">57</option>
			  <option value="58">58</option>
			  <option value="59">59</option>
			</select>
			小时:
			<select id="hour">
			  <option value="*"> *</option>
			  <option value="0">00</option>
			  <option value="1">01</option>
			  <option value="2">02</option>
			  <option value="3">03</option>
			  <option value="4">04</option>
			  <option value="5">05</option>
			  <option value="6">06</option>
			  <option value="7">07</option>
			  <option value="8">08</option>
			  <option value="9">09</option>
			  <option value="10">10</option>
			  <option value="11">11</option>
			  <option value="12">12</option>
			  <option value="13">13</option>
			  <option value="14">14</option>
			  <option value="15">15</option>
			  <option value="16">16</option>
			  <option value="17">17</option>
			  <option value="18">18</option>
			  <option value="19">19</option>
			  <option value="20">20</option>
			  <option value="21">21</option>
			  <option value="22">22</option>
			  <option value="23">23</option>
			</select>
			日:
			 <select id="day">
			  <option value="*"> *</option>
			  <option value="1">01</option>
			  <option value="2">02</option>
			  <option value="3">03</option>
			  <option value="4">04</option>
			  <option value="5">05</option>
			  <option value="6">06</option>
			  <option value="7">07</option>
			  <option value="8">08</option>
			  <option value="9">09</option>
			  <option value="10">10</option>
			  <option value="11">11</option>
			  <option value="12">12</option>
			  <option value="13">13</option>
			  <option value="14">14</option>
			  <option value="15">15</option>
			  <option value="16">16</option>
			  <option value="17">17</option>
			  <option value="18">18</option>
			  <option value="19">19</option>
			  <option value="20">20</option>
			  <option value="21">21</option>
			  <option value="22">22</option>
			  <option value="23">23</option>
			  <option value="24">24</option>
			  <option value="25">25</option>
			  <option value="26">26</option>
			  <option value="27">27</option>
			  <option value="28">28</option>
			  <option value="29">29</option>
			  <option value="30">30</option>
			  <option value="31">31</option>
			</select>
			</div>
				<div class="form-group">
					<div class="col-sm-2 control-label">cron时间表达式</div>
					<div class="col-sm-10">
						<input type="text" class="form-control"
							v-model="schedule.cronExpression"  name="cronExpression" id="cron" readonly="readonly"
							placeholder="0 * * * 0 ?"/>
					</div>
				</div>
				<div class="form-group">
					<div class="col-sm-2 control-label">消息标题</div>
					<div class="col-sm-10">
						<input type="text" class="form-control" v-model="schedule.params" name="params"
							placeholder="消息标题" value="" />
					</div>

				</div>
				<div class="form-group">
					<div class="col-sm-2 control-label">消息内容</div>
					<div class="col-sm-10">
						<input type="text" class="form-control" v-model="schedule.content" name="content"
						placeholder="消息内容" value="" />
					</div>
				</div>

				<div class="form-group">
					<div class="col-sm-2 control-label">备注</div>
					<div class="col-sm-10">
						<input type="text" class="form-control" v-model="schedule.remark" name="remark"
							placeholder="备注" />
					</div>
				</div>
				<div class="form-group">
					<div class="col-sm-2 control-label"></div>
					<input type="button" class="btn btn-primary" @click="saveOrUpdate" 
						value="确定" /> &nbsp;&nbsp;<input type="button"
						class="btn btn-warning" @click="reload" value="返回" />
				</div>
			</form>
		</div>
	</div>

	<script src="../../js/modules/job/stationNotes.js"></script>


	<!-- 选择组织 -->
	<div id="deptLayer" style="display: none; padding: 10px;">
		<ul id="deptTree" class="ztree"></ul>
	</div>
	<!-- 选择病区-->
	<div id="deptLayerSick" style="display: none; padding: 10px;">
		<ul id="deptTreeSick" class="ztree"></ul>
	</div>
</body>
</html>